From ed28a71bf287165a3c48e331876a22876c5f59d9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Jun 2014 14:03:45 -0400 Subject: [PATCH] GtkAppChooserButton: Fix a possible crash We were not correctly dealing with content_type being NULL in one place. --- gtk/gtkappchooserbutton.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c index 9bdcf8b79a..af910c8d01 100644 --- a/gtk/gtkappchooserbutton.c +++ b/gtk/gtkappchooserbutton.c @@ -332,7 +332,8 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self) if (self->priv->show_default_item) { - default_app = g_app_info_get_default_for_type (self->priv->content_type, FALSE); + if (self->priv->content_type) + default_app = g_app_info_get_default_for_type (self->priv->content_type, FALSE); if (default_app != NULL) { -- 2.30.2